package com.example.pc.videodemo.emq.model.deviceData

import android.util.Log
import com.example.pc.videodemo.emq.model.EmqConstant
import com.example.pc.videodemo.emq.model.MqttMassgePostBase
import com.example.pc.videodemo.emq.Publisher

data class DeviceDataPublisher(var text: String, var phoneType: String) : Publisher() {
    override val emq: EmqConstant.androidToServerEnum
        get() = EmqConstant.androidToServerEnum.deviceData
    override val message: MqttMassgePostBase
        get() {
            val postBean = DeviceDataPostBeanBase()
            Log.i("TAG", "DeviceDataPublisher: " + text)
            val phoneData = DeviceDataPostBeanBase.Phone(text, phoneType)
            postBean.data = phoneData
            return postBean
        }
}